Optimal. Leaf size=132 \[ -\frac {a^3 \tanh ^{-1}(\sin (e+f x))}{c^3 f}-\frac {2 a (a+a \sec (e+f x))^2 \tan (e+f x)}{5 f (c-c \sec (e+f x))^3}+\frac {2 \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{3 c f (c-c \sec (e+f x))^2}-\frac {2 a^3 \tan (e+f x)}{f \left (c^3-c^3 \sec (e+f x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 2, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {4042, 3855}
\begin {gather*} -\frac {a^3 \tanh ^{-1}(\sin (e+f x))}{c^3 f}-\frac {2 a^3 \tan (e+f x)}{f \left (c^3-c^3 \sec (e+f x)\right )}+\frac {2 \tan (e+f x) \left (a^3 \sec (e+f x)+a^3\right )}{3 c f (c-c \sec (e+f x))^2}-\frac {2 a \tan (e+f x) (a \sec (e+f x)+a)^2}{5 f (c-c \sec (e+f x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3855
Rule 4042
Rubi steps
\begin {align*} \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c-c \sec (e+f x))^3} \, dx &=-\frac {2 a (a+a \sec (e+f x))^2 \tan (e+f x)}{5 f (c-c \sec (e+f x))^3}-\frac {a \int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c-c \sec (e+f x))^2} \, dx}{c}\\ &=-\frac {2 a (a+a \sec (e+f x))^2 \tan (e+f x)}{5 f (c-c \sec (e+f x))^3}+\frac {2 \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{3 c f (c-c \sec (e+f x))^2}+\frac {a^2 \int \frac {\sec (e+f x) (a+a \sec (e+f x))}{c-c \sec (e+f x)} \, dx}{c^2}\\ &=-\frac {2 a (a+a \sec (e+f x))^2 \tan (e+f x)}{5 f (c-c \sec (e+f x))^3}+\frac {2 \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{3 c f (c-c \sec (e+f x))^2}-\frac {2 a^3 \tan (e+f x)}{f \left (c^3-c^3 \sec (e+f x)\right )}-\frac {a^3 \int \sec (e+f x) \, dx}{c^3}\\ &=-\frac {a^3 \tanh ^{-1}(\sin (e+f x))}{c^3 f}-\frac {2 a (a+a \sec (e+f x))^2 \tan (e+f x)}{5 f (c-c \sec (e+f x))^3}+\frac {2 \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{3 c f (c-c \sec (e+f x))^2}-\frac {2 a^3 \tan (e+f x)}{f \left (c^3-c^3 \sec (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 139, normalized size = 1.05 \begin {gather*} -\frac {a^3 \left (-\frac {26 \cot \left (\frac {1}{2} (e+f x)\right )}{15 f}+\frac {2 \cot \left (\frac {1}{2} (e+f x)\right ) \csc ^2\left (\frac {1}{2} (e+f x)\right )}{15 f}-\frac {2 \cot \left (\frac {1}{2} (e+f x)\right ) \csc ^4\left (\frac {1}{2} (e+f x)\right )}{5 f}-\frac {\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )}{f}+\frac {\log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )}{f}\right )}{c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 78, normalized size = 0.59
method | result | size |
derivativedivides | \(\frac {2 a^{3} \left (\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2}+\frac {1}{5 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}+\frac {1}{3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}+\frac {1}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}-\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2}\right )}{f \,c^{3}}\) | \(78\) |
default | \(\frac {2 a^{3} \left (\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2}+\frac {1}{5 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}+\frac {1}{3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}+\frac {1}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}-\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2}\right )}{f \,c^{3}}\) | \(78\) |
risch | \(\frac {4 i a^{3} \left (15 \,{\mathrm e}^{4 i \left (f x +e \right )}-30 \,{\mathrm e}^{3 i \left (f x +e \right )}+100 \,{\mathrm e}^{2 i \left (f x +e \right )}-50 \,{\mathrm e}^{i \left (f x +e \right )}+13\right )}{15 f \,c^{3} \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{5}}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{c^{3} f}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{c^{3} f}\) | \(120\) |
norman | \(\frac {-\frac {2 a^{3}}{5 c f}+\frac {8 a^{3} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{15 c f}-\frac {6 a^{3} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5 c f}+\frac {22 a^{3} \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5 c f}-\frac {16 a^{3} \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 c f}+\frac {2 a^{3} \left (\tan ^{10}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c f}}{\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3} c^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}+\frac {a^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{c^{3} f}-\frac {a^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{c^{3} f}\) | \(199\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 335 vs.
\(2 (140) = 280\).
time = 0.31, size = 335, normalized size = 2.54 \begin {gather*} -\frac {a^{3} {\left (\frac {60 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{c^{3}} - \frac {60 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{c^{3}} - \frac {{\left (\frac {20 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {105 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + 3\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{5}}{c^{3} \sin \left (f x + e\right )^{5}}\right )} - \frac {3 \, a^{3} {\left (\frac {10 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {15 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + 3\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{5}}{c^{3} \sin \left (f x + e\right )^{5}} + \frac {a^{3} {\left (\frac {10 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {15 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - 3\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{5}}{c^{3} \sin \left (f x + e\right )^{5}} + \frac {9 \, a^{3} {\left (\frac {5 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - 1\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{5}}{c^{3} \sin \left (f x + e\right )^{5}}}{60 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.34, size = 190, normalized size = 1.44 \begin {gather*} \frac {52 \, a^{3} \cos \left (f x + e\right )^{3} - 44 \, a^{3} \cos \left (f x + e\right )^{2} - 4 \, a^{3} \cos \left (f x + e\right ) + 92 \, a^{3} - 15 \, {\left (a^{3} \cos \left (f x + e\right )^{2} - 2 \, a^{3} \cos \left (f x + e\right ) + a^{3}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) \sin \left (f x + e\right ) + 15 \, {\left (a^{3} \cos \left (f x + e\right )^{2} - 2 \, a^{3} \cos \left (f x + e\right ) + a^{3}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) \sin \left (f x + e\right )}{30 \, {\left (c^{3} f \cos \left (f x + e\right )^{2} - 2 \, c^{3} f \cos \left (f x + e\right ) + c^{3} f\right )} \sin \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {a^{3} \left (\int \frac {\sec {\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} - 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} - 1}\, dx + \int \frac {3 \sec ^{2}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} - 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} - 1}\, dx + \int \frac {3 \sec ^{3}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} - 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} - 1}\, dx + \int \frac {\sec ^{4}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} - 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} - 1}\, dx\right )}{c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 102, normalized size = 0.77 \begin {gather*} -\frac {\frac {15 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{c^{3}} - \frac {15 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{c^{3}} - \frac {2 \, {\left (15 \, a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 5 \, a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, a^{3}\right )}}{c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5}}}{15 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.78, size = 78, normalized size = 0.59 \begin {gather*} \frac {2\,a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+\frac {2\,a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{3}+\frac {2\,a^3}{5}}{c^3\,f\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}-\frac {2\,a^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{c^3\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________